<?php

/** 
 * 积分日志
 * @author Legend. <xcx_legender@qq.com>
 * @param 
 * @return 
 */

namespace Common\Service;

Class ScoreLogService extends BaseService
{

	public function set_log($uid, $action, $score, $memo = '', $target_id = 0, $action_id = 0)
	{
		$data = [
			'uid' 		=> (int)$uid,
			'action'	=> $action,
			'score'		=> (int)$score,
			'memo'		=> $memo,
			'date'		=> date('Y-m-d', NOW_TIME),
			'create_time'	=> NOW_TIME,
			'target_id' => $target_id,
			'action_id' => $action_id ?: $uid,
		];
		$this->add($data);
	}

}